﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MetadataBasedConfig.POCO
{
    public interface IRepository<TEntity>
        where TEntity : class,IEntity
    {
        int Add(TEntity entity);
        int Delete(TEntity entity);
        int Update(TEntity entity);

        TEntity FindById(Int64 id);
        IEnumerable<TEntity> FindAll();

        TResult Excute<TResult>(System.Linq.Expressions.Expression<Func<IEnumerable<TEntity>, TResult>> expression);
    }
}